-
Notifications
You must be signed in to change notification settings - Fork 1k
Adding unit tests to #278 #284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
and reverting the UI package upgrade as 3.1.1 has a bug
/Microsoft.Identity.Web.Test/obj | ||
/4-WebApp-your-API/4-2-B2C/.vs | ||
/4-WebApp-your-API/4-2-B2C/Client/obj | ||
/4-WebApp-your-API/4-2-B2C/TodoListService/obj | ||
/2-WebApp-graph-user/2-3-Multi-Tenant/.vs/WebApp-OpenIDConnect-DotNet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was already present in the .gitignore
.editorconfig = .editorconfig | ||
EndProjectSection | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Identity.Web.Test", "..\..\Microsoft.Identity.Web.Test\Microsoft.Identity.Web.Test.csproj", "{8CCEAE2A-BDF6-470C-B6DE-7FC81A74DBD7}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the unit tests assembly to the solution
@@ -19,7 +19,7 @@ | |||
|
|||
<ItemGroup> | |||
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="3.0.0" /> | |||
<PackageReference Include="Microsoft.Graph" Version="1.14.0" /> | |||
<PackageReference Include="Microsoft.Graph" Version="1.21.0" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating to the latest Graph SDK
@@ -53,8 +53,8 @@ | |||
</PropertyGroup> | |||
|
|||
<ItemGroup> | |||
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="3.1.1" /> | |||
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureADB2C.UI" Version="3.1.1" /> | |||
<PackageReference Include="Microsoft.AspNetCore.Authentication.AzureAD.UI" Version="3.0.0" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AzureADB2C.UI 3.1.1 has an issue.
if (!authority.EndsWith("v2.0")) | ||
authority += "/v2.0"; | ||
options.Authority = authority; | ||
EnsureAuthorityIsV2_0(options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactoring for testability
options.TokenValidationParameters.ValidAudiences = validAudiences; | ||
// The valid audience could be given as Client Id or as Uri. | ||
// If it does not start with 'api://', this variant is added to the list of valid audiences. | ||
EnsureValidAudiencesContainsApiGuidIfGuidProvided(options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactoring for testability
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding unit tests to #278 and reverting the UI package upgrade as 3.1.1 has a bug
Purpose
Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test
What to Check
Verify that the following are valid
Other Information